package com.platform.modules.sys.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.validation.constraints.NotBlank;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.platform.common.validator.group.AddGroup;
import com.platform.common.validator.group.UpdateGroup;

import lombok.Data;

/**
 * @author wangLc
 * 注册机构人员信息
 * 2019-5-18
 */
@Data
@TableName("SYS_ORG_USER")
@ApiModel(value="企业人员关系实体类",description="企业人员关系实体类")
public class SysOrgUserEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value="用户ID",example="")
	@TableId
	private String id;

	@ApiModelProperty(value="机构编号",example="")
	@NotBlank(message = "所属机构不能为空", groups = { AddGroup.class, UpdateGroup.class })
	private String orgNo;
	

	@ApiModelProperty(value="聘用状态（0未开始1拒绝被聘用2同意被聘用3被拒绝聘用4发起聘用等待同意）",example="")
	private String employStatus;

	@ApiModelProperty(value="执业印章号",example="")
	private String sealNo;

	@ApiModelProperty(value="从事职务",example="")
	private String seal;
	
	@ApiModelProperty(value="人员id",example="") 
	private String userId;

	@ApiModelProperty(value="开始聘用日期",example="")
	private Date startEmpDate;

	@ApiModelProperty(value="结束聘用日期",example="")
	private Date endEmpDate;

	@ApiModelProperty(value="聘用单位发起日期",example="")
	private Date launchDate;
	
	@ApiModelProperty(value="资质人员处理日期",example="")
	private Date procesDate;
	
	@ApiModelProperty(value="拒绝聘用原因",example="")
	private String reasonRef;

	@ApiModelProperty(value="单位解聘原因",example="")
	private String reasonDismiss;
	
	@ApiModelProperty(value="单位解聘日期",example="")
	private Date reasonDate;
	
	@ApiModelProperty(value="信息创建人",example="")
	private String createUserId;
	
	@ApiModelProperty(value="创建时间",example="")
	private Date createTime;
	
	////////////////////////////////非数据库字段
	
	@TableField(exist = false)
	private List<String> roleIdList;

	@ApiModelProperty(value="聘用状态名称（0未开始1拒绝被聘用2同意被聘用3被拒绝聘用4发起聘用等待同意）",example="")
	@TableField(exist = false)
	private String employStatusName;

	@ApiModelProperty(value="审核状态（0未注册 1待审核 2有效中/启用3禁用4.审核未通过）",example="")
	@TableField(exist = false)
	private String status;
	

	@ApiModelProperty(value="单位名称",example="")
	@TableField(exist = false)
	private String orgName;
	
	@ApiModelProperty(value="单位类型",example="")
	@TableField(exist = false)
	private String orgType;

	@ApiModelProperty(value="单位类型名称",example="")
	@TableField(exist = false)
	private String orgTypeName;
	
	@TableField(exist = false)
	private String gender;

	@TableField(exist = false)
	private String realName;

	@TableField(exist = false)
	private String userName;

	@TableField(exist = false)
	private Date birthday;

	@TableField(exist = false)
	private String email;

	@TableField(exist = false)
	private String contact;

	@TableField(exist = false)
	private String accountType;

	@TableField(exist = false)
	private String roleId;

	@ApiModelProperty(value="身份证号码",example="")
	@TableField(exist = false)
	private String userCard;

	@ApiModelProperty(value="所在省份",example="")
	@TableField(exist = false)
	private String province;

	@ApiModelProperty(value="所在市",example="")
	@TableField(exist = false)
	private String city;

	@ApiModelProperty(value="是否具备审查资质",example="")
	@TableField(exist = false)
	private String examinant;

	@ApiModelProperty(value="职称专业(多个)",example="")
	@TableField(exist = false)
	private String professional;

	@ApiModelProperty(value="技术职称(多个)",example="")
	@TableField(exist = false)
	private String technical;

	@ApiModelProperty(value="毕业院校",example="")
	@TableField(exist = false)
	private String graduateSchool;

	@ApiModelProperty(value="毕业时间",example="")
	@TableField(exist = false)
	private Date GraduateTime;

	@ApiModelProperty(value="所学专业(多个)",example="")
	@TableField(exist = false)
	private String majorSubject;

	@ApiModelProperty(value="最高学历",example="")
	@TableField(exist = false)
	private String education;

	@ApiModelProperty(value="角色列表",example="")
	@TableField(exist = false)
	private List<SysRoleEntity> roleList;

	@ApiModelProperty(value="建设单位企业/个人（1企业2个人）",example="")
	@TableField(exist = false)
	private String orgPerson;

	@ApiModelProperty(value="出生日期",example="")
	@DateTimeFormat(pattern="yyyy-MM-dd")
    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
	@TableField(exist = false)
	private Date birthDate;

	@ApiModelProperty(value="民族",example="")
	@TableField(exist = false)
	private String nation;

	@ApiModelProperty(value="标记id(用于邮箱验证)",example="")
	@TableField(exist = false)
	private String signId;
}
